<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<html>
<head>
    <title>新增书籍</title>
    <link rel="stylesheet" type="text/css" href="<s:url value="/inc/style.css"/>">
    <script type="text/javascript" src="<s:url value="/js/jquery.js"/>"></script>
</head>
<body>
<center>
    <s:action name="header" executeResult="true" namespace="/"/>
    <table width="900">
        <tr>
            <td height="30">当前位置>>新增用户</td>
        </tr>
    </table>
    <table width="900" border="1" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" bordercolordark="#FFFFFF"  bordercolorlight="#888888">
        <tr>
            <td align="center">
                <s:actionmessage cssStyle="color:red"/>
                <table width="100%">
                    <form id="J_form" action="<s:url value="/user_adduser.action"/>" method="post">
                        <input type="hidden" name="id" value="<s:property value="model.id"/>"/>
                        <tr>
                            <th height="35" align="right" width="40%">帐号：</th>
                            <td width="60%"><input type="text" id="UserId" name="UserId"/></td>
                        </tr>
                        <tr>
                            <th height="35" align="right" width="40%">角色：</th>
                            <td width="60%">
                                <select id="role" name="role" style="width:130px">
                                    <option value="2">普通用户</option>
                                     <option value="1">管理员</option>
                                </select>
                            </td>
                        </tr> 
                        <tr>
                            <td height="35" colspan="2" align="center">&nbsp;&nbsp;
                                <input type="submit" value="保存"/>&nbsp;&nbsp;
                                <input type="button" value="返回" onclick="history.go(-1)"/>
                            </td>
                        </tr>
                    </form>
                </table>
            </td>
        </tr>
    </table>
</center>
<script type="text/javascript">
    $(function(){
        $("#J_form").submit(function(){
            if($("#J_userName").val()==""){
                alert("帐号不能为空！");
                return false;
            }
            return true;
        })
    })
</script>
</body>
</html>
